//
//  StatusNomalCell.swift
//  Weibo
//
//  Created by 孙明海 on 16/2/22.
//  Copyright © 2016年 孙明海. All rights reserved.
//

import UIKit

class StatusNomalCell: StatusCell {
    
    override var statusViewModel: StatusViewModel? {
        didSet {
            pictureView.statusViewModel = statusViewModel
            pictureView.snp_updateConstraints { (make) -> Void in

                let offset = (statusViewModel?.thumbnailUrls?.count > 0) ? StatusCellMargin : 0
                make.top.equalTo(contentLable.snp_bottom).offset(offset)
            }
        }
    }

    override func setupUI() {
        super.setupUI()
        
        pictureView.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(contentLable.snp_left)
            make.top.equalTo(contentLable.snp_bottom).offset(StatusCellMargin)
            make.height.equalTo(300)
            make.width.equalTo(300)
        }
    }

}
